1. Field of the Invention
The present invention relates to an edge-enhancement processing apparatus and method for performing edge enhancement processing based on multi-level image data representing an image with pixels in dot matrix, and a medium containing an edge-enhancement processing program.
2. Description of the Prior Art
Conventionally, image-processing software programs for performing edge enhancement processing to enhance edge portions on image data representing a photograph or the like are known. These programs read image data into a computer, convert the image data at different edge enhancement levels by trial and error. An operator checks the converted result on a display screen by visual observation, thus adjusting it to have appropriately enhanced edge portions.
Japanese Patent Application Laid-Open No. 6-68252 discloses obtaining high frequency components in edge areas of an image by using a high-frequency band filter, judging the sharpness of the image based on the mean value of the high frequency components and controlling an edge enhancement parameter.
In the former case, since the converted result must be checked by the operator""s visual observation, an appropriate enhancing level cannot be automatically set.
In the latter case, since the high frequency components are obtained by using the high-frequency band filter, the processing is complicated.
Accordingly, an object of the present invention is to provide an edge-enhancement processing apparatus and method capable of judging the sharpness of an image with simpler method and automatically performing optimum edge enhancement processing.
The edge-enhancement processing apparatus provided by the present invention is an edge-enhancement processing apparatus comprising: image-data obtaining unit which obtains multi-level image data representing an image with pixels in dot matrix; summation processing unit which calculates a change level of each pixel based on differences of luminance or substitute values for luminance between the pixel and peripheral pixels, as a vector value, and sums up vector values of pixels having large vector values; edge-enhancement element determination unit which determines an edge enhancement element while judging a sharpness level of the image based on the result of summation; and edge-enhancement unit which performs edge enhancement processing on respective edge pixels based on the determined edge enhancement element.
In the present invention having the above construction, when the image-data obtaining unit obtains multi-level image data representing an image with pixels in dot matrix, the summation processing unit calculates a change level of each pixel based on differences of luminance or substitute values for luminance between the pixel and peripheral pixels, as a vector value, and sums up vector values of pixels having large vector values. On the other hand, the edge-enhancement element determination unit determines an edge enhancement element while judging the sharpness level of the image based on the result of summation. The edge enhancement unit performs edge enhancement processing on respective edge pixels based on the determined edge enhancement element.
That is, upon calculating the sharpness level of the image from change levels of respective pixels on the premise that the enhancement level is not necessarily greatly raised if the image is sharp, the change level of each pixel is calculated based on the differences of luminance or substitute values for luminance between the pixel and peripheral pixels, as a vector value. The image change levels are obtained in pixel units on the premise that the image data is composed of pixels in dot matrix.
On the other hand, assuming that an object to be image-sensed is called a subject and the area other than the subject is called a background, the operator considers edge enhancement processing only based on the sharpness level of the subject and takes little account of the background. In this case, the subject is usually sharper than the background. Accordingly, when the sharpness level of the image is judged based on the result of summation with respect to pixels having large change level, the judgment is made on the same condition as that for judgment with respect to the subject.
According to the present invention, as a vector value is calculated based on the differences of luminance or substitue values for luminance between each pixel and peripheral pixels, to determine the edge enhancement element, an edge-enhancement processing apparatus which automatically performs edge enhancement processing can be provided with a simple construction.
As described above, when calculating the sharpness level of the image from change levels of respective pixels, the calculation of a vector value based on the differences of luminance or substitute values for luminance between each pixel and peripheral pixels are not necessarily realized by a hardware apparatus, but may be realized as a method for the apparatus. Accordingly, the present invention provides an edge-enhancement processing method for performing edge enhancement processing on multi-level image data representing an image with pixels in dot matrix, comprising: a step of calculating a change level of each pixel based on differences of luminance or substitute values for luminance between the pixel and peripheral pixels, as a vector value, and summing up vector values of pixels having large vector values; a step of determining an edge enhancement element while a judging sharpness level of the image based on the result of summation, while; and a step of performing edge enhancement processing on respective edge pixels based on the determined edge enhancement element.
That is, the edge enhancement processing is effective not only when embodied with a hardware apparatus but when embodied as a method for the apparatus.
The summation processing unit calculates a change level of each pixel based on differences of luminance or substitute values for luminance between the pixel and peripheral pixels, as a vector value. If the image data has pixel data in dot matrix arranged in vertical and lateral directions, there are eight adjacent pixels around a pixel of interest. However, in evaluation, comparison may not be necessarily made with all these adjacent pixels.
Accordingly, another object of the present invention is to provide an example of the summation processing unit. To attain the object, in the edge-enhancement processing apparatus provided by the present invention, when the summation processing unit calculates a change level of each pixel based on differences of luminance or substitute values for luminance between the pixel and peripheral pixels, as a vector value, employs the differences of luminance or substitute values for luminance among a plurality of pixels which are not arrayed in a linear direction.
According to the present invention having the above construction, as the vector is generated based on the differences of luminance or substitute values for luminance among a plurality of pixels which are not arrayed in a linear direction, the number of pixels taken into consideration upon vector generation is the half of that in the previous construction. That is, in case of pixels adjacent to each other, the vector elements arrayed in a linear direction interact with each other, therefore, evaluation on these pixels may be omitted without significant influence.
In this manner, according to the present invention, the vectors can be obtained in pixel units with small amount of calculation processing.
Further, as the summation processing unit to sum up the change levels of the pixels to judge the sharpness level of the image, various types of processing units may be employed.
Further, another object of the present invention is to provide an example of the summation processing unit.
In the edge-enhancement processing apparatus provided by the present invention, said summation processing unit performs the summation such that as the vector value increases, a weight increases.
In the present invention having the above construction, when the summation processing unit sums up the change level, the weight is increased as the change level increases. The summation includes reducing the weight as the change level decreases. In any case, the sharpness level of the image is judged while making much account on a sharp portion such as a subject.
Further, the result of summation is not limited to a specific value, but may be a mean value or a median as long as it is a central value in statistical meaning.
In this manner, according to the present invention, the influence levels of pixels are controlled by changing the weight, and an optimum edge enhancement element can be determined.
Further, in this example, the summation is performed on pixels having substantially large change levels by changing the weight, however, it is not limited to this arrangement.
Further, another object of the present invention is to provide an example of summation on pixels having substantially large change levels.
In the edge-enhancement processing apparatus provided by the present invention, said summation processing unit performs summation on outline pixels having large change level.
In the present invention having the above construction, the summation processing unit sums up the change levels of pixels having large vector values. That is, the summation is performed only on outline pixels, making no account on pixels other than the outline pixels, and the sharpness level of the image is judged based on the result of summation. Accordingly, an image portion with low sharpness level such as a background is not taken into consideration in image sharpness level judgment unless it is determined as an outline portion.
In this manner, according to the present invention, as the sharpness level of the image is judged only at outline portions having large image change level, an optimum edge enhancement level can be set without influence by the size of the background or the like.
The edge enhancement element is not limited to the enhancement level, but it includes various control conditions for enhancement processing.
Further, another object of the present invention is to provide an example of control condition for enhancement processing.
In the edge-enhancement processing apparatus provided by the present invention, said edge-enhancement element determination unit determines an enhanced-pixel selection condition so as to perform edge enhancement processing only on pixels having vector values higher than a predetermined threshold value, based on the result of summation.
In the present invention having the above construction, the edge-enhancement element determination unit determines the enhanced-pixel selection condition based on the result of summation so as to perform enhancement processing only on pixels having vector values higher than the predetermined threshold value. That is, enhancement processing is performed only on pixels having change levels higher than the predetermined threshold value, apart from the enhancement level, which avoids enhancement on a portion which is not an edge portion.
In this manner, according to the present invention, image quality can be improved by avoiding enhancement processing on non-edge portions.
When the threshold value is set based on the result of summation, the threshold value is set so as not to perform edge enhancement processing on non-edge pixels. More specifically, various references can be employed in the threshold setting.
Further, another object of the present invention is to provide a specific threshold-value setting method.
In the edge-enhancement processing apparatus provided by the present invention, said edge-enhancement element determination unit determines the threshold value based on the ratio of the pixels having the large vector values.
In the present invention having the above construction, when setting the enhanced-pixel selection condition, the edge-enhancement element determination unit obtains the ratio of pixels having large vector values and determines the threshold value based on the ratio. That is, if the number of pixels having large change levels is large in the entire image, the threshold value is lowered so as to perform enhancement on many pixels. If the number of pixels having large change levels is small in the entire image, the threshold value is raised so as not to easily perform enhancement on non-edge pixels.
In this manner, according to the present invention, as the threshold value is set based on the ratio of pixels having large change levels in the entire image, if the entire image is sharp, the threshold value is lowered so as to perform edge enhancement processing on more pixels, to improve the image quality, while if the entire image is unsharp, the threshold value is raised so as not to easily perform edge enhancement processing, to avoid edge enhancement processing on non-edge pixels.
The enhancement level may be determined not only based on the vector values as described above, but based on other factors.
Accordingly, another object of the present invention is to provide an edge-enhancement processing apparatus in consideration of the other factors.
In the edge-enhancement processing apparatus provided by the present invention, said edge-enhancement element determination unit detects an image size of the image, and determines the edge enhancement element such that as the image size increases, the edge enhancement level increases.
In the present invention having the above construction, when the edge-enhancement element determination unit determines the edge enhancement element, the unit detects the image size of the image data, and sets the edge enhancement element such that as the image size increases, the enhancement level increases. When an operator tries to recognize an image or the like, if the image is large, the operator tends to see the image from apart Accordingly, in such case, the enhancement level must be raised so that the large image has the same visual effect of equal value as the small one.
In this manner, according to the present invention, a further optimum edge enhancement level can be set by using the image size, corresponding to effect of edge enhancement processing, as a reference for edge-enhancement element determination.
On the other hand, the edge enhancement processing itself performed by the edge enhancement unit may be any processing as long as it is performed based on the determined enhancement element, and its concrete method is not limited to a specific method.
Accordingly, another object of the present invention is to provide a more specific example of edge enhancement processing.
In the edge-enhancement processing apparatus provided by the present invention, said edge enhancement unit has unsharp masks of different sizes, and selects one of the unsharp masks in correspondence with different edge enhancement levels.
In the present invention having the above construction, as the unsharp masks of different sizes are provided, enhancement is performed by selecting one of the unsharp masks, in correspondence with the different edge enhancement levels. As the unsharp mask is greater, more peripheral pixels are processed, which blurs the image. However, in the edge enhancement processing, the unsharp components are subtracted, which reinforces the edge enhancement processing.
In this manner, according to the present invention, the edge enhancement level can be controlled comparatively easily by changing the size of the unsharp mask.
The edge-enhancement processing apparatus may be a single apparatus or installed into another apparatus. Thus, the concept of the invention is not limited to the above edge-enhancement processing apparatus but includes various aspects. Accordingly, the present invention may be appropriately modified. For example, the present invention may be embodied with software or hardware construction.
In a case where the concept of the present invention is embodied as a software program for an edge-enhancement processing apparatus, the present invention is utilized as the software program recorded in a recording medium.
Further, another object of the present invention is to provide a recording medium in which the software is recorded.
The medium containing an edge-enhancement processing program provided by the present invention is a medium containing an edge-enhancement processing program for performing edge enhancement processing by a computer on multi-level image data representing an image with pixels in dot matrix, said program including: a step of calculating a change level of each pixel based on differences of luminance or substitute values for luminance between the pixel and peripheral pixels, as a vector value, and summing up the vector values; a step of determining an edge enhancement element while judging a sharpness level of the image based on the result of summation; and a step of performing edge enhancement processing on respective edge pixels based on the determined edge enhancement element.
The recording medium may be a magnetic recording medium or an magneto-optical recording medium, or further, any recording medium to be developed in the future. Furthermore, the recording medium may be a duplicated product such as a primary duplicated product or a secondary duplicated product. Further, the present invention can be utilized by providing the present invention via a communication line, or using the present invention written in a semiconductor chip or the like.
Further, even if the present invention is embodied partially with a software construction and partially with a hardware construction, the concept of the present invention is not different at all, further, it may be arranged such that a part of the present invention is stored on a recording medium and appropriately read in accordance with necessity.
In this manner, according to the present invention, a medium where the edge-enhancement processing program is recorded can be provided.
In the point that image quality is improved by increasing the edge enhancement level as the image becomes greater, the sharpness level of the image should not be necessarily calculated from change levels of respective pixels.
Accordingly, further object of the present invention is to provide an edge-enhancement processing apparatus and method capable of performing optimum edge enhancement processing in accordance with the size of an image.
The edge-enhancement processing apparatus provided by the present invention is an edge-enhancement processing apparatus comprising: image-data obtaining unit which obtains multi-level image data representing an image with pixels in dot matrix; edge-enhancement level obtaining unit which obtains an edge enhancement level; edge-enhancement level correction unit which detects an image size of the image data, and corrects the edge enhancement level such that as the image size increases, the edge enhancement level increases; and edge enhancement unit for corrected enhancement level which performs edge enhancement processing on respective edge pixels based on the corrected edge enhancement level.
In the present invention having the above construction, the edge-enhancement level obtaining unit obtains the edge enhancement level, and for edge enhancement on respective edge pixels based on the edge enhancement level, the edge-enhancement level correction unit detects the size of the image, and corrects the enhancement level such that as the image size increases, the edge enhancement level increases, and the edge enhancement unit for corrected enhancement level performs edge enhancement on respective edge pixels based on the corrected edge enhancement level.
According to the present invention, as the size of the image corresponding to the effect of edge enhancement processing is also used as a reference for edge-enhancement level setting, a more optimum enhancement level of edge enhancement processing can be set.
It will be easily understood that the correction on the enhancement level in accordance with the size of the image should not be necessarily realized by a hardware apparatus, but it may be realized as a method for the apparatus. Accordingly, the edge-enhancement processing method provided by the present invention is an edge-enhancement processing method for performing edge enhancement processing on multi-level image data representing an image with pixels in dot matrix, comprising: a step of obtaining multi-level image data representing an image with pixels in dot matrix; a step of obtaining an edge enhancement level; a step of detecting an image size of the image data, and correcting the edge enhancement level such that as the image size increases, the edge-enhancement level increases; and a step of performing edge enhancement processing on respective edge pixels based on the corrected edge enhancement level.
That is, the preset invention is effective not only when embodied with a hardware apparatus but when embodied as a method for the apparatus.
In this case, the concept of the present invention is not limited to the method, but it includes various aspects. For example, the present invention is realized in the form of a software program.
In a case where the concept of the present invention is embodied as a software program for an edge-enhancement processing apparatus, the present invention is utilized as the software program recorded in a recording medium.
Further, another object of the present invention is to provide a recording medium in which the software is recorded.
The medium containing an edge-enhancement processing program provided by the present invention is a medium containing an edge-enhancement processing program for performing edge enhancement processing by a computer on multi-level image data representing an image with pixels in dot matrix, said program including: a step of obtaining multi-level image data representing an image with pixels in dot matrix; a step of obtaining an edge enhancement level; a step of detecting an image size of the image data, and correcting the edge enhancement level such that as the image size increases, the edge enhancement level increases; and a step of performing edge enhancement processing on respective edge pixels based on the corrected edge enhancement level.
As described above, according to the present invention, a medium containing a program for performing the above edge-enhancement processing can be provided.